//
//  ViewController.h
//  MJDemo
//
//  Created by admin on 2021/7/14.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, EMPTYSTYLE) {
    
    //空视图类型
    EmptyViewMember,//档案管理
    EmptyViewRecord,//记录
    EmptyViewSelectMember,//选择成员
    EmptyViewSearchArchive,//搜索档案管理
    EmptyViewMemberInfo,//成员详情
    EmptyViewCountryCode,//国家码
    
};
typedef NS_ENUM(NSUInteger, NAVTYPE) {
    NavTypeWhite,  //白色
    NavTypeGray, //浅灰色
    NavTypeBlack, //黑色
};
typedef NS_ENUM(NSUInteger, BackgroundColorType) {
    BackgroundColorTypeWhite,  //白色
    BackgroundColorTypeGray, //浅灰色
};
@interface BasicViewController : UIViewController

/// 检测页面进来
@property (nonatomic, assign) BOOL isFromDetection;

/// 成员详情进来
@property (nonatomic, assign) BOOL isFromMember;

/// 首次加载
@property (nonatomic, assign) BOOL isFirstAppear;

/// 受检者id
@property (nonatomic, strong) NSString *patientId;

/// 受检者
@property (nonatomic, strong) PatientModel *patientModel;

- (MJCommonModel *)getParmModel;

/// 检查类型
@property (nonatomic, assign) DetectionItemType detectionItemType;

@property (nonatomic, copy) NSString *minDate;

@property (nonatomic, copy) NSString *maxDate;

/// 检测时段
@property (nonatomic, strong) NSString *period;

/// 是否移除本控制器
@property (nonatomic, assign) BOOL isRemove;

/// 导航栏阴影
@property (nonatomic, assign) BOOL isHiddenNavShadow;

/// 是否隐藏loading
@property (nonatomic, assign) BOOL hideLoading;

/// 导航栏样色
@property (nonatomic, assign) NAVTYPE navType;

/// 导航栏样色
@property (nonatomic, assign) BackgroundColorType backgroundColorType;

/// 右边图片按钮
@property (nonatomic, strong) UIButton *btnRight;

/// 右边Item按钮
@property (nonatomic, strong) UIBarButtonItem *btnItemRight;

/// 左边Item按钮
@property (nonatomic, strong) UIBarButtonItem *btnItemLeft;

/// 返回按钮
@property (nonatomic, strong) UIButton *btnBack;

/// 是否显示返回按钮
@property (nonatomic, assign) BOOL isShowBack;

/// push控制器
- (void)pushViewController:(NSString *)targetStr;

/// 右侧导航栏标题按钮点击
- (void)handleRightBarButtonClick;

/// 返回按钮点击
- (void)handleBackButtonClick;

/// 设置导航栏右边文字按钮
/// @param title 标题
- (void)setNavRightItemTitle:(NSString *)title;

/// 设置导航栏右边文字按钮
/// @param title 标题
/// @param titleColor 标题颜色
- (void)setNavRightItemTitle:(NSString *)title titleColor:(UIColor *)titleColor;

/// 设置导航栏左边文字按钮
/// @param title 标题
/// @param titleColor 标题颜色
- (void)setNavLeftItemTitle:(NSString *)title titleColor:(UIColor *)titleColor;

/// 设置导航栏右边文字按钮
/// @param title 标题
/// @param titleColor 标题颜色
/// @param disabledColor 禁用的颜色
- (void)setNavRightItemTitle:(NSString *)title titleColor:(UIColor *)titleColor disabledColor:(UIColor *)disabledColor;

/// 设置导航栏右边图片按钮
/// @param name 图片名称
- (void)setNavRightItemImageName:(NSString *)name;

/// 设置导航栏右边图片按钮
/// @param image 图片
- (void)setNavRightItemImage:(UIImage *)image;

/// 设置导航栏右边图片按钮
/// @param normalImageName 正常图片
/// @param selectedImageName 选择状态图片
- (void)setNavRightItemNormalImageName:(NSString *)normalImageName selectedImageName:(NSString *)selectedImageName;

/// 设置UI界面样色
- (void)mj_setUI;

/// 显示空白页面
- (void)showEmptyView:(UIView *)view emptyStyle:(EMPTYSTYLE)emptyStyle;

/// 隐藏空白页面
- (void)hideEmptyView:(UIView *)view;

/// 设置导航栏右侧图片文字按钮
/// @param title 标题
/// @param imageName 图片
- (void)setNavRightItemTitle:(NSString *)title imageName:(NSString *)imageName;

/// pop到指定控制器
/// @param targetArr 控制器名称数组
/// @param waitThread 是否等待
- (void)popViewControllerWithTargetArr:(NSArray *)targetArr WaitThread:(BOOL)waitThread;

/// 取消向下偏移 64/20
/// @param srcollView 滚动
- (void)setContentInsetNever:(UIScrollView *)srcollView;

@end

